#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<string>

using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int> v;
	vector < vector<int> > vv(N,v);
	for (int i = 0; i < N; i++)
	{
		vv[i].resize(i + 1, 1);
	}
	for (int i = 0; i < N; i++)
	{
		for (int j = 1; j < vv[i].size()-1; j++)
		{
			vv[i][j] = vv[i - 1][j] + vv[i - 1][j - 1];
		}
	}
	for (int i = 0; i < N; i++)
	{
		for (int j = 0; j < vv[i].size(); j++)
		{
			if((j>0&&j< vv[i].size()-1)&&vv[i][j+1]>9)
			cout << vv[i][j] << "  ";
			else
			{
				cout << vv[i][j] << "   ";
			}
		}
		cout << endl;
	}

	return 0;
}

//1
//1   1
//1   2   1
//1   3   3   1
//1   4   6   4   1
//1   5   10   10   5   1
//
//1
//1   1
//1   2   1
//1   3   3   1
//1   4   6   4   1
//1   5  10  10   5   1

//1
//1   1
//1   2   1
//1   3   3   1
//1   4   6   4   1
//1   5  10  10   5   1